<!--
 * @Descripttion: (OP60盖板底座焊丝组合/dc_op50_record)
 * @Author: (admin)
 * @Date: (2025-02-27)
-->
<template>
    <div>
      <el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent>
       
        <el-form-item :label="$t('op20.col1')" prop="coverCode">
            <el-input v-model="queryParams.coverCode" placeholder="" clearable style="width: 240px" @keyup.enter="handleQuery" />
          </el-form-item>
         
          <el-form-item :label="$t('op20.col31')">
            <el-date-picker
              v-model="queryParams.dateRange"
              style="width: 240px"
              type="daterange"
              value-format="YYYY-MM-DD HH:mm:ss"
              :default-time="defaultTime2"
              range-separator="-"
              start-placeholder=""
              end-placeholder=""></el-date-picker>
          </el-form-item>
        <el-form-item>
          <el-button icon="search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
          <el-button icon="refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
        </el-form-item>
      </el-form>
      <!-- 工具区域 -->
      <el-row :gutter="15" class="mb10">
        <el-col :span="1.5">
          <!-- <el-button type="primary" v-hasPermi="['dcop50record:add']" plain icon="plus" @click="handleAdd">
            {{ $t('btn.add') }}
          </el-button> -->
        </el-col>
        <right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
      </el-row>
  
      <el-table
        :data="dataList"
        v-loading="loading"
        ref="table"
        border
        header-cell-class-name="el-table-header-cell"
        highlight-current-row
        @sort-change="sortChange"
        >
        <!-- <el-table-column prop="id" label="Id" align="center" v-if="columns.showColumn('id')"/> -->
        
        <el-table-column prop="coverCode" label="盖板码" width="160" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('coverCode')"/>
        <el-table-column prop="locationId" label="工位ID" width="100" align="center" :show-overflow-tooltip="true" />
        
        <el-table-column prop="totalResult" label="总结果" width="100" align="center" :show-overflow-tooltip="true" />
        <el-table-column prop="midPltInspectRes" label="中板检测结果" width="100" align="center" :show-overflow-tooltip="true" />
        <el-table-column prop="weldTabInspectRes" label="焊片检测结果" width="100" align="center" :show-overflow-tooltip="true" />
        <el-table-column prop="finInspectRes" label="翅片检测结果" width="100" align="center" :show-overflow-tooltip="true" />
        
        <el-table-column prop="middlePlateBasketCode" label="中板子篮码" width="100" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('middlePlateBasketCode')"/>
        <el-table-column prop="weldedPlateBasketCode" label="焊片子篮码	" width="100" align="center" :show-overflow-tooltip="true" v-if="columns.showColumn('weldedPlateBasketCode')"/>
        
        <!-- <el-table-column prop="outerRingFinCount" label="外环检测翅片数量	" width="100" align="center" v-if="columns.showColumn('outerRingFinCount')"/>
        <el-table-column prop="innerRingFinCount" label="内环检测翅片数量" width="100" align="center" v-if="columns.showColumn('innerRingFinCount')"/>
        
        <el-table-column prop="outerRingFlatness" label="外环平面度	" width="100" align="center" v-if="columns.showColumn('outerRingFlatness')"/>
        <el-table-column prop="innerRingFlatness" label="内环平面度	" width="100" align="center" v-if="columns.showColumn('innerRingFlatness')"/>
         -->
        <el-table-column prop="roundHoleInspection1" label="圆孔检测 1	" width="100" align="center" v-if="columns.showColumn('roundHoleInspection1')"/>
        <el-table-column prop="roundHoleInspection2" label="圆孔检测 2	" width="100" align="center" v-if="columns.showColumn('roundHoleInspection2')"/>
        <el-table-column prop="cylinderInspection1" label="圆柱检测 1" width="100" align="center" v-if="columns.showColumn('cylinderInspection1')"/>
        <el-table-column prop="cylinderInspection2" label="圆柱检测 2	" width="100" align="center" v-if="columns.showColumn('cylinderInspection2')"/>
        <el-table-column prop="warpageValue" label="翘曲值	" width="100" align="center" v-if="columns.showColumn('warpageValue')"/>
        <el-table-column prop="flatness" label="平面度" width="100" align="center" v-if="columns.showColumn('flatness')"/>
        <el-table-column prop="profileXDistance" label="轮廓度 x 距离" width="100" align="center" v-if="columns.showColumn('profileXDistance')"/>
        <el-table-column prop="profileYDistance" label="轮廓度 y 距离" width="100" align="center" v-if="columns.showColumn('profileYDistance')"/>
        <el-table-column prop="positionDegreeTopLeftCircle" label="位置度左上圆" width="100" align="center" v-if="columns.showColumn('positionDegreeTopLeftCircle')"/>
        <el-table-column prop="positionDegreeBottomRightCircle" label="位置度右下圆" width="100" align="center" v-if="columns.showColumn('positionDegreeBottomRightCircle')"/>
        <el-table-column prop="thickness" label="厚度" width="100" align="center" v-if="columns.showColumn('thickness')"/>
        <el-table-column prop="leftFlatness" label="平面度左	" width="100" align="center" v-if="columns.showColumn('leftFlatness')"/>
        <el-table-column prop="leftQuantity" label="数量左" width="100" align="center" v-if="columns.showColumn('leftQuantity')"/>
        <el-table-column prop="maxSpacingLeftHead" label="最大间距左头" width="100" align="center" v-if="columns.showColumn('maxSpacingLeftHead')"/>
        <el-table-column prop="maxSpacingLeftMiddle" label="最大间距左中	" width="100" align="center" v-if="columns.showColumn('maxSpacingLeftMiddle')"/>
        <el-table-column prop="maxSpacingLeftTail" label="最大间距左尾	" width="100" align="center" v-if="columns.showColumn('maxSpacingLeftTail')"/>
        <el-table-column prop="rightFlatness" label="平面度右	" width="100" align="center" v-if="columns.showColumn('rightFlatness')"/>
        <el-table-column prop="rightQuantity" label="数量右" width="100" align="center" v-if="columns.showColumn('rightQuantity')"/>
        <el-table-column prop="maxSpacingRightHead" label="最大间距右头" width="100" align="center" v-if="columns.showColumn('maxSpacingRightHead')"/>
        <el-table-column prop="maxSpacingRightMiddle" label="最大间距右中	" width="100" align="center" v-if="columns.showColumn('maxSpacingRightMiddle')"/>
        <el-table-column prop="maxSpacingRightTail" label="最大间距右尾	" width="100" align="center" v-if="columns.showColumn('maxSpacingRightTail')"/>
   
        <el-table-column prop="createdTime" label="创建时间" width="160" :show-overflow-tooltip="true"  v-if="columns.showColumn('createdTime')"/>

        <!-- <el-table-column label="操作" width="160">
          <template #default="scope">
            <el-button type="success" size="small" icon="edit" title="编辑" v-hasPermi="['dcop50record:edit']" @click="handleUpdate(scope.row)"></el-button>
            <el-button type="danger" size="small" icon="delete" title="删除" v-hasPermi="['dcop50record:delete']" @click="handleDelete(scope.row)"></el-button>
          </template>
        </el-table-column> -->
      </el-table>
      <pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
  
  
      <!-- 添加或修改OP60盖板底座焊丝组合对话框 -->
      <el-dialog :title="title" :lock-scroll="false" v-model="open" >
        <el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
          <el-row :gutter="20">
              
            <el-col :lg="12" v-if="opertype != 1">
              <el-form-item label="Id" prop="id">
                <el-input-number v-model.number="form.id" controls-position="right" placeholder="请输入Id" :disabled="true"/>
              </el-form-item>
            </el-col>
              
            <el-col :lg="12">
              <el-form-item label="托盘号" prop="palletNo">
                <el-input v-model.number="form.palletNo" placeholder="请输入托盘号" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="盖板码" prop="coverCode">
                <el-input v-model="form.coverCode" placeholder="请输入盖板码" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="中板子篮码" prop="middlePlateBasketCode">
                <el-input v-model="form.middlePlateBasketCode" placeholder="请输入中板子篮码" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="焊片子篮码	" prop="weldedPlateBasketCode">
                <el-input v-model="form.weldedPlateBasketCode" placeholder="请输入焊片子篮码	" />
              </el-form-item>
            </el-col>
              
            <el-col :lg="12">
              <el-form-item label="外环检测翅片数量	" prop="outerRingFinCount">
                <el-input v-model.number="form.outerRingFinCount" placeholder="请输入外环检测翅片数量	" />
              </el-form-item>
            </el-col>
              
            <el-col :lg="12">
              <el-form-item label="内环检测翅片数量" prop="innerRingFinCount">
                <el-input v-model.number="form.innerRingFinCount" placeholder="请输入内环检测翅片数量" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="外环平面度	" prop="outerRingFlatness">
                <el-input v-model="form.outerRingFlatness" placeholder="请输入外环平面度	" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="内环平面度	" prop="innerRingFlatness">
                <el-input v-model="form.innerRingFlatness" placeholder="请输入内环平面度	" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="圆孔检测 1	" prop="roundHoleInspection1">
                <el-input v-model="form.roundHoleInspection1" placeholder="请输入圆孔检测 1	" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="圆孔检测 2	" prop="roundHoleInspection2">
                <el-input v-model="form.roundHoleInspection2" placeholder="请输入圆孔检测 2	" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="圆柱检测 1" prop="cylinderInspection1">
                <el-input v-model="form.cylinderInspection1" placeholder="请输入圆柱检测 1" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="圆柱检测 2	" prop="cylinderInspection2">
                <el-input v-model="form.cylinderInspection2" placeholder="请输入圆柱检测 2	" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="翘曲值	" prop="warpageValue">
                <el-input v-model="form.warpageValue" placeholder="请输入翘曲值	" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="平面度" prop="flatness">
                <el-input v-model="form.flatness" placeholder="请输入平面度" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="轮廓度 x 距离" prop="profileXDistance">
                <el-input v-model="form.profileXDistance" placeholder="请输入轮廓度 x 距离" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="轮廓度 y 距离" prop="profileYDistance">
                <el-input v-model="form.profileYDistance" placeholder="请输入轮廓度 y 距离" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="位置度左上圆" prop="positionDegreeTopLeftCircle">
                <el-input v-model="form.positionDegreeTopLeftCircle" placeholder="请输入位置度左上圆" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="位置度右下圆" prop="positionDegreeBottomRightCircle">
                <el-input v-model="form.positionDegreeBottomRightCircle" placeholder="请输入位置度右下圆" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="厚度" prop="thickness">
                <el-input v-model="form.thickness" placeholder="请输入厚度" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="平面度左	" prop="leftFlatness">
                <el-input v-model="form.leftFlatness" placeholder="请输入平面度左	" />
              </el-form-item>
            </el-col>
              
            <el-col :lg="12">
              <el-form-item label="数量左" prop="leftQuantity">
                <el-input v-model.number="form.leftQuantity" placeholder="请输入数量左" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="最大间距左头" prop="maxSpacingLeftHead">
                <el-input v-model="form.maxSpacingLeftHead" placeholder="请输入最大间距左头" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="最大间距左中	" prop="maxSpacingLeftMiddle">
                <el-input v-model="form.maxSpacingLeftMiddle" placeholder="请输入最大间距左中	" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="最大间距左尾	" prop="maxSpacingLeftTail">
                <el-input v-model="form.maxSpacingLeftTail" placeholder="请输入最大间距左尾	" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="平面度右	" prop="rightFlatness">
                <el-input v-model="form.rightFlatness" placeholder="请输入平面度右	" />
              </el-form-item>
            </el-col>
              
            <el-col :lg="12">
              <el-form-item label="数量右" prop="rightQuantity">
                <el-input v-model.number="form.rightQuantity" placeholder="请输入数量右" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="最大间距右头" prop="maxSpacingRightHead">
                <el-input v-model="form.maxSpacingRightHead" placeholder="请输入最大间距右头" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="最大间距右中	" prop="maxSpacingRightMiddle">
                <el-input v-model="form.maxSpacingRightMiddle" placeholder="请输入最大间距右中	" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="最大间距右尾	" prop="maxSpacingRightTail">
                <el-input v-model="form.maxSpacingRightTail" placeholder="请输入最大间距右尾	" />
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="修改时间" prop="updateTime">
                <el-date-picker v-model="form.updateTime" type="datetime" :teleported="false" placeholder="选择日期时间"></el-date-picker>
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="创建时间" prop="createdTime">
                <el-date-picker v-model="form.createdTime" type="datetime" :teleported="false" placeholder="选择日期时间"></el-date-picker>
              </el-form-item>
            </el-col>
  
            <el-col :lg="12">
              <el-form-item label="IsDeleted" prop="isDeleted">
                <el-radio-group v-model="form.isDeleted">
                  <el-radio v-for="item in options.isDeletedOptions" :key="item.dictValue" :value="item.dictValue">
                    {{item.dictLabel}}
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <template #footer v-if="opertype != 3">
          <el-button text @click="cancel">{{ $t('btn.cancel') }}</el-button>
          <el-button type="primary" @click="submitForm">{{ $t('btn.submit') }}</el-button>
        </template>
      </el-dialog>
    </div>
  </template>
  
  <script setup name="dcop50record">
  import { listDcOp50Record,
   addDcOp50Record, delDcOp50Record, 
   updateDcOp50Record,getDcOp50Record, 
   } 
  from '@/api/business/dcop50record.js'
  const { proxy } = getCurrentInstance()
  const ids = ref([])
  const loading = ref(false)
  const showSearch = ref(true)
  const queryParams = reactive({
    pageNum: 1,
    pageSize: 10,
    sort: '',
    sortType: 'asc',
    dateRange:[]
  })
  const defaultTime2 = [
  new Date(2000, 1, 1, 0, 0, 0),
  new Date(2000, 2, 1, 23, 59, 59),
]
  const columns = ref([
    { visible: true, prop: 'id', label: 'Id' },
    { visible: true, prop: 'palletNo', label: '托盘号' },
    { visible: true, prop: 'coverCode', label: '盖板码' },
    { visible: true, prop: 'middlePlateBasketCode', label: '中板子篮码' },
    { visible: true, prop: 'weldedPlateBasketCode', label: '焊片子篮码	' },
    { visible: true, prop: 'outerRingFinCount', label: '外环检测翅片数量	' },
    { visible: true, prop: 'innerRingFinCount', label: '内环检测翅片数量' },
    { visible: true, prop: 'outerRingFlatness', label: '外环平面度	' },
    { visible: true, prop: 'innerRingFlatness', label: '内环平面度	' },
    { visible: true, prop: 'roundHoleInspection1', label: '圆孔检测 1	' },
    { visible: true, prop: 'roundHoleInspection2', label: '圆孔检测 2	' },
    { visible: true, prop: 'cylinderInspection1', label: '圆柱检测 1' },
    { visible: true, prop: 'cylinderInspection2', label: '圆柱检测 2	' },
    { visible: true, prop: 'warpageValue', label: '翘曲值	' },
    { visible: true, prop: 'flatness', label: '平面度' },
    { visible: true, prop: 'profileXDistance', label: '轮廓度 x 距离' },
    { visible: true, prop: 'profileYDistance', label: '轮廓度 y 距离' },
    { visible: true, prop: 'positionDegreeTopLeftCircle', label: '位置度左上圆' },
    { visible: true, prop: 'positionDegreeBottomRightCircle', label: '位置度右下圆' },
    { visible: true, prop: 'thickness', label: '厚度' },
    { visible: true, prop: 'leftFlatness', label: '平面度左	' },
    { visible: true, prop: 'leftQuantity', label: '数量左' },
    { visible: true, prop: 'maxSpacingLeftHead', label: '最大间距左头' },
    { visible: true, prop: 'maxSpacingLeftMiddle', label: '最大间距左中	' },
    { visible: true, prop: 'maxSpacingLeftTail', label: '最大间距左尾	' },
    { visible: true, prop: 'rightFlatness', label: '平面度右	' },
    { visible: true, prop: 'rightQuantity', label: '数量右' },
    { visible: true, prop: 'maxSpacingRightHead', label: '最大间距右头' },
    { visible: true, prop: 'maxSpacingRightMiddle', label: '最大间距右中	' },
    { visible: true, prop: 'maxSpacingRightTail', label: '最大间距右尾	' },

    { visible: true, prop: 'createdTime', label: '创建时间' },

  ])
  const total = ref(0)
  const dataList = ref([])
  const queryRef = ref()
  const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)])
  
  
  var dictParams = [
  ]
  
  
  function getList(){
    loading.value = true
    const body = { ...queryParams }
    delete body.dateRange
    proxy.addDateRange(body, queryParams.dateRange) 
   

    listDcOp50Record(body).then(res => {
      const { code, data } = res
      if (code == 200) {
        dataList.value = data.result
        total.value = data.totalNum
        loading.value = false
      }
    })
  }
  
  // 查询
  function handleQuery() {
    queryParams.pageNum = 1
    getList()
  }
  
  // 重置查询操作
  function resetQuery(){
    proxy.resetForm("queryRef")
    queryParams.dateRange=[]
    handleQuery()
  }
  // 自定义排序
  function sortChange(column) {
    var sort = undefined
    var sortType = undefined
  
    if (column.prop != null && column.order != null) {
      sort = column.prop
      sortType = column.order
  
    }
    queryParams.sort = sort
    queryParams.sortType = sortType
    handleQuery()
  }
  
  /*************** form操作 ***************/
  const formRef = ref()
  const title = ref('')
  // 操作类型 1、add 2、edit 3、view
  const opertype = ref(0)
  const open = ref(false)
  const state = reactive({
    single: true,
    multiple: true,
    form: {},
    rules: {
      palletNo: [{ required: true, message: "托盘号不能为空", trigger: "blur"    , type: "number"  }],
      coverCode: [{ required: true, message: "盖板码不能为空", trigger: "blur"     }],
      middlePlateBasketCode: [{ required: true, message: "中板子篮码不能为空", trigger: "blur"     }],
      weldedPlateBasketCode: [{ required: true, message: "焊片子篮码	不能为空", trigger: "blur"     }],
      outerRingFinCount: [{ required: true, message: "外环检测翅片数量	不能为空", trigger: "blur"    , type: "number"  }],
      innerRingFinCount: [{ required: true, message: "内环检测翅片数量不能为空", trigger: "blur"    , type: "number"  }],
      outerRingFlatness: [{ required: true, message: "外环平面度	不能为空", trigger: "blur"     }],
      innerRingFlatness: [{ required: true, message: "内环平面度	不能为空", trigger: "blur"     }],
      roundHoleInspection1: [{ required: true, message: "圆孔检测 1	不能为空", trigger: "blur"     }],
      roundHoleInspection2: [{ required: true, message: "圆孔检测 2	不能为空", trigger: "blur"     }],
      cylinderInspection1: [{ required: true, message: "圆柱检测 1不能为空", trigger: "blur"     }],
      cylinderInspection2: [{ required: true, message: "圆柱检测 2	不能为空", trigger: "blur"     }],
      warpageValue: [{ required: true, message: "翘曲值	不能为空", trigger: "blur"     }],
      flatness: [{ required: true, message: "平面度不能为空", trigger: "blur"     }],
      profileXDistance: [{ required: true, message: "轮廓度 x 距离不能为空", trigger: "blur"     }],
      profileYDistance: [{ required: true, message: "轮廓度 y 距离不能为空", trigger: "blur"     }],
      positionDegreeTopLeftCircle: [{ required: true, message: "位置度左上圆不能为空", trigger: "blur"     }],
      positionDegreeBottomRightCircle: [{ required: true, message: "位置度右下圆不能为空", trigger: "blur"     }],
      thickness: [{ required: true, message: "厚度不能为空", trigger: "blur"     }],
      leftFlatness: [{ required: true, message: "平面度左	不能为空", trigger: "blur"     }],
      leftQuantity: [{ required: true, message: "数量左不能为空", trigger: "blur"    , type: "number"  }],
      maxSpacingLeftHead: [{ required: true, message: "最大间距左头不能为空", trigger: "blur"     }],
      maxSpacingLeftMiddle: [{ required: true, message: "最大间距左中	不能为空", trigger: "blur"     }],
      maxSpacingLeftTail: [{ required: true, message: "最大间距左尾	不能为空", trigger: "blur"     }],
      rightFlatness: [{ required: true, message: "平面度右	不能为空", trigger: "blur"     }],
      rightQuantity: [{ required: true, message: "数量右不能为空", trigger: "blur"    , type: "number"  }],
      maxSpacingRightHead: [{ required: true, message: "最大间距右头不能为空", trigger: "blur"     }],
      maxSpacingRightMiddle: [{ required: true, message: "最大间距右中	不能为空", trigger: "blur"     }],
      maxSpacingRightTail: [{ required: true, message: "最大间距右尾	不能为空", trigger: "blur"     }],
      updateTime: [{ required: true, message: "修改时间不能为空", trigger: "blur"     }],
      createdTime: [{ required: true, message: "创建时间不能为空", trigger: "blur"     }],
      isDeleted: [{ required: true, message: "IsDeleted不能为空", trigger: "blur"     }],
    },
    options: {
      // IsDeleted 选项列表 格式 eg:{ dictLabel: '标签', dictValue: '0'}
  isDeletedOptions: [],
    }
  })
  
  const { form, rules, options, single, multiple } = toRefs(state)
  
  // 关闭dialog
  function cancel(){
    open.value = false
    reset()
  }
  
  // 重置表单
  function reset() {
    form.value = {
      id: null,
      palletNo: null,
      coverCode: null,
      middlePlateBasketCode: null,
      weldedPlateBasketCode: null,
      outerRingFinCount: null,
      innerRingFinCount: null,
      outerRingFlatness: null,
      innerRingFlatness: null,
      roundHoleInspection1: null,
      roundHoleInspection2: null,
      cylinderInspection1: null,
      cylinderInspection2: null,
      warpageValue: null,
      flatness: null,
      profileXDistance: null,
      profileYDistance: null,
      positionDegreeTopLeftCircle: null,
      positionDegreeBottomRightCircle: null,
      thickness: null,
      leftFlatness: null,
      leftQuantity: null,
      maxSpacingLeftHead: null,
      maxSpacingLeftMiddle: null,
      maxSpacingLeftTail: null,
      rightFlatness: null,
      rightQuantity: null,
      maxSpacingRightHead: null,
      maxSpacingRightMiddle: null,
      maxSpacingRightTail: null,
      updateTime: null,
      createdTime: null,
      isDeleted: null,
    };
    proxy.resetForm("formRef")
  }
  
  
  // 添加按钮操作
  function handleAdd() {
    reset();
    open.value = true
    title.value = '添加OP60盖板底座焊丝组合'
    opertype.value = 1
  }
  // 修改按钮操作
  function handleUpdate(row) {
    reset()
    const id = row.id || ids.value
    getDcOp50Record(id).then((res) => {
      const { code, data } = res
      if (code == 200) {
        open.value = true
        title.value = '修改OP60盖板底座焊丝组合'
        opertype.value = 2
  
        form.value = {
          ...data,
        }
      }
    })
  }
  
  // 添加&修改 表单提交
  function submitForm() {
    proxy.$refs["formRef"].validate((valid) => {
      if (valid) {
  
        if (form.value.id != undefined && opertype.value === 2) {
          updateDcOp50Record(form.value).then((res) => {
            proxy.$modal.msgSuccess("修改成功")
            open.value = false
            getList()
          })
        } else {
          addDcOp50Record(form.value).then((res) => {
              proxy.$modal.msgSuccess("新增成功")
              open.value = false
              getList()
            })
        }
      }
    })
  }
  
  // 删除按钮操作
  function handleDelete(row) {
    const Ids = row.id || ids.value
  
    proxy
      .$confirm('是否确认删除参数编号为"' + Ids + '"的数据项？', "警告", {
        confirmButtonText: proxy.$t('common.ok'),
        cancelButtonText: proxy.$t('common.cancel'),
        type: "warning",
      })
      .then(function () {
        return delDcOp50Record(Ids)
      })
      .then(() => {
        getList()
        proxy.$modal.msgSuccess("删除成功")
      })
  }
  
  
  
  
  
  handleQuery()
  </script>